﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sasa.QualityTools.CodeAnalysis.Common
{
    public static class EnumerableExtension
    {
        public static void ForEach<T>(this IEnumerable<T> values, Action<T> procedure)
        {
            if (values == null)
            {
                throw new ArgumentNullException("values");
            }
            if (procedure == null)
            {
                throw new ArgumentNullException("procedure");
            }

            values.ToList().ForEach(o => procedure(o));
        }
    }
}
